﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using bi4homev3.Entidades;
using bi4homev3.Logica;

namespace bi4homev3.Paginas
{
    public partial class NuevoLocal : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["validar"].Equals("false"))
            {
                Response.Redirect("NuevoPerfil.aspx");
            }

        }

        protected void sendperfil_Click(object sender, EventArgs e)
        {
            Local locales = new Local();
            locales.NombreLocal = this.nombreLocal.Text;
            locales.Calle = this.calle.Text;
            locales.Sector = this.sector.Text;
            locales.Referencia = this.referencia.Text;
            locales.Lugar = Convert.ToInt32(this.DropDownList1.Text);
            locales.Usuario = (string)(Session["usuario"]);
            AccionesLocal crea = new AccionesLocal(locales);
            crea.insertar();
            this.RESPUESTA.Text = "Se Realizo con EXITO la Operación";
            this.sendperfil.Enabled = false;
        }

        

      

    }
}
